package com.lyb.hardware.io;

import com.lyb.Utils;
import com.lyb.constant.SystemConstant;

/**
 * A类设备
 *
 * @author Dayun Mr.Alpaca
 * @version 1.4.0
 */
public class A implements AlpacaDevice {
    /**
     * 设备id
     */
    private final long id;

    public A() {
        /* 给设备实体随机分配一个id */
        id = Utils.getUniqueId();
    }

    @Override
    public void start() {
        String curTime = Utils.getCurrentTime();
        Utils.log(curTime+":           A设备["+id+"]正在使用中", SystemConstant.SYSTEM_LOG_PATH);
    }

    @Override
    public void finish() {
        String curTime = Utils.getCurrentTime();
        Utils.log(curTime+":           A设备["+id+"]使用结束", SystemConstant.SYSTEM_LOG_PATH);
    }
}
